

package top.continew.admin.question.dify;

import io.github.imfangs.dify.client.*;
import io.github.imfangs.dify.client.model.DifyConfig;
import top.continew.admin.question.config.MyDifyConfig;

public class DifyClientUtil {

    // 图片识别题目
    public static final DifyWorkflowClient imageQuestionWorkflowClient = DifyClientFactory
        .createWorkflowClient(DifyConfig.builder()
            .apiKey(MyDifyConfig.IMAGE_QUESTION_API_KEY)
            .baseUrl(MyDifyConfig.API_URL)
            .build());
    public static final DifyClient imageQuestionFileClient = DifyClientFactory
        .createClient(MyDifyConfig.API_URL, MyDifyConfig.IMAGE_QUESTION_API_KEY);
    // 题目作答
    public static final DifyWorkflowClient questionAnswerWorkflowClient = DifyClientFactory
        .createWorkflowClient(MyDifyConfig.API_URL, MyDifyConfig.QUESTION_ANSWER_API_KEY);
    // 题目知识点
    public static final DifyWorkflowClient questionKnowledgeWorkflowClient = DifyClientFactory
        .createWorkflowClient(MyDifyConfig.API_URL, MyDifyConfig.QUESTION_KNOWLEDGE_API_KEY);
    // 根据知识点生成题目
    public static final DifyWorkflowClient questionGenerateWorkflowClient = DifyClientFactory
        .createWorkflowClient(MyDifyConfig.API_URL, MyDifyConfig.QUESTION_GENERATE_API_KEY);
    // 根据题目用户答案，总结学习成果
    public static final DifyWorkflowClient questionSummaryWorkflowClient = DifyClientFactory
        .createWorkflowClient(MyDifyConfig.API_URL, MyDifyConfig.QUESTION_SUMMARY_API_KEY);

}
